<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>项目专家验收报告</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Microsoft YaHei", sans-serif;
        }
        body {
            background-color: #f5f5f5;
            padding: 20px;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            padding: 20px;
        }
        .header {
            text-align: center;
            margin-bottom: 20px;
            position: relative;
            padding-bottom: 15px;
            border-bottom: 1px solid #eee;
        }
        .header h1 {
            font-size: 22px;
            font-weight: bold;
            color: #333;
        }
        .new-tag {
            position: absolute;
            left: 0;
            top: 5px;
            background-color: #f2f2f2;
            color: #666;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 14px;
            display: flex;
            align-items: center;
        }
        .new-tag::before {
            content: "";
            display: inline-block;
            width: 8px;
            height: 8px;
            background-color: #999;
            border-radius: 50%;
            margin-right: 5px;
        }
        .header .separator {
            margin-top: 5px;
            height: 2px;
            background-color: #f00;
            width: 100%;
        }
        .form-group {
            display: flex;
            margin-bottom: 15px;
            align-items: center;
        }
        .form-label {
            width: 90px;
            text-align: right;
            padding-right: 10px;
            color: #333;
            font-size: 14px;
            flex-shrink: 0;
        }
        .form-label.required::before {
            content: "*";
            color: #f00;
            margin-right: 2px;
        }
        .form-control {
            flex: 1;
            height: 36px;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 5px 10px;
            font-size: 14px;
        }
        .clear-btn {
            width: 20px;
            height: 20px;
            background: none;
            border: none;
            cursor: pointer;
            color: #999;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 5px;
        }
        .conclusion-group {
            display: flex;
            margin-bottom: 15px;
            align-items: center;
            flex-wrap: wrap;
        }
        .checkbox-group {
            display: flex;
            align-items: center;
            margin-right: 20px;
        }
        .checkbox-group label {
            margin-left: 5px;
            font-size: 14px;
            color: #333;
        }
        .conclusion-label {
            margin-right: 20px;
            color: #333;
            font-size: 14px;
        }
        .search-btn {
            width: 32px;
            height: 32px;
            background: none;
            border: none;
            cursor: pointer;
            color: #666;
            font-size: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .report-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
        }
        .report-table th, .report-table td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: center;
            font-size: 14px;
        }
        .report-table th {
            background-color: #f9f9f9;
            font-weight: normal;
        }
        .report-table .comments {
            height: 200px;
            vertical-align: top;
            text-align: left;
        }
        .report-table .comments textarea {
            width: 100%;
            height: 100%;
            border: none;
            resize: none;
            padding: 5px;
            font-size: 14px;
            font-family: "Microsoft YaHei", sans-serif;
            outline: none;
        }
        .report-table .project-name {
            vertical-align: middle;
        }
        .report-table .project-name input {
            width: 100%;
            border: none;
            padding: 5px;
            font-size: 14px;
            text-align: center;
            outline: none;
        }
        .report-table .acceptance-date {
            height: 40px;
        }
        .report-table .acceptance-date input {
            width: 100%;
            border: none;
            padding: 5px;
            font-size: 14px;
            text-align: center;
            outline: none;
        }
        .report-table .conclusion {
            height: 40px;
        }
        .report-table .conclusion-options {
            display: flex;
            justify-content: space-around;
            flex-wrap: wrap;
        }
        .report-table .conclusion-option {
            display: flex;
            align-items: center;
            margin: 0 5px;
        }
        .report-table .conclusion-option label {
            margin-left: 5px;
            font-size: 14px;
        }
        .report-table .expert-table {
            border-collapse: collapse;
            width: 100%;
        }
        .report-table .expert-table th, .report-table .expert-table td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: center;
            font-size: 14px;
        }
        .report-table .expert-table input {
            width: 100%;
            border: none;
            padding: 3px;
            font-size: 14px;
            text-align: center;
            outline: none;
        }
        .report-table .expert-group {
            height: 120px;
            vertical-align: top;
        }
        .red-text {
            color: #f00;
        }
        .file-upload {
            margin-top: 20px;
            margin-bottom: 20px;
        }
        .file-label {
            display: flex;
            align-items: center;
            font-size: 14px;
            color: #333;
            margin-bottom: 10px;
        }
        .file-label svg {
            margin-right: 5px;
            fill: #2d8cf0;
        }
        .file-btn {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100px;
            height: 100px;
            border: 1px dashed #ddd;
            background-color: #fafafa;
            cursor: pointer;
        }
        .file-btn svg {
            width: 40px;
            height: 40px;
            fill: #ddd;
        }
        .attachment-list {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 15px;
        }
        .attachment-item {
            display: flex;
            align-items: center;
            padding: 5px 10px;
            background-color: #f9f9f9;
            border: 1px solid #eee;
            border-radius: 4px;
            font-size: 12px;
        }
        .attachment-item svg {
            width: 16px;
            height: 16px;
            margin-right: 5px;
            fill: #2d8cf0;
        }
        .attachment-item .delete-btn {
            margin-left: 5px;
            color: #f00;
            cursor: pointer;
        }
        .action-btns {
            display: flex;
            justify-content: center;
            margin-top: 20px;
            gap: 10px;
            flex-wrap: wrap;
        }
        .btn {
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            border: none;
        }
        .btn-primary {
            background-color: #2d8cf0;
            color: #fff;
        }
        .btn-success {
            background-color: #19be6b;
            color: #fff;
        }
        .btn-danger {
            background-color: #ed4014;
            color: #fff;
        }
        .btn-default {
            background-color: #f2f2f2;
            color: #666;
            border: 1px solid #ddd;
        }
        .btn-print {
            background-color: #fff;
            color: #333;
            border: 1px solid #ddd;
            display: flex;
            align-items: center;
        }
        .btn-print svg {
            margin-right: 5px;
            fill: #666;
        }
        .btn-upload {
            background-color: #fff;
            color: #333;
            border: 1px solid #ddd;
            display: flex;
            align-items: center;
        }
        .btn-upload svg {
            margin-right: 5px;
            fill: #666;
        }
        
        @media (max-width: 768px) {
            .form-group {
                flex-direction: column;
                align-items: flex-start;
            }
            .form-label {
                width: 100%;
                text-align: left;
                margin-bottom: 5px;
            }
            .conclusion-group {
                flex-direction: column;
                align-items: flex-start;
            }
            .conclusion-label {
                margin-top: 10px;
                margin-bottom: 5px;
            }
            .action-btns {
                flex-direction: column;
                align-items: center;
            }
            .btn {
                width: 100%;
                margin-bottom: 10px;
            }
        }
        
        /* 调整表格边框样式 */
        .report-table, .report-table th, .report-table td {
            border: 1px solid #666;
        }
        
        .report-table {
            border-collapse: collapse;
            width: 100%;
            margin-top: 20px;
        }
        
        /* 让表格填满整个宽度 */
        .report-table tr:first-child td:nth-child(2) {
            width: 70%;
        }
        
        /* 添加表格中的水平和垂直居中对齐 */
        .report-table th {
            text-align: center;
            vertical-align: middle;
            font-weight: normal;
            background-color: #f9f9f9;
            color: #333;
        }
        
        /* 修改结论选项样式 */
        .conclusion-options {
            display: flex;
            justify-content: flex-start;
            gap: 30px;
            padding: 5px 10px;
        }
        
        .conclusion-option input[type="radio"] {
            margin-right: 5px;
        }
        
        /* 修改专家表格样式 */
        .expert-table, .expert-table th, .expert-table td {
            border: 1px solid #666;
        }
        
        .expert-table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .expert-table th {
            height: 36px;
            background-color: #f9f9f9;
        }
        
        .expert-table td {
            height: 36px;
        }
        
        .date-format {
            position: relative;
        }
        
        .date-format input {
            width: 100%;
            border: none;
            text-align: center;
            outline: none;
            background: transparent;
            height: 100%;
            padding: 8px;
        }
        
        .date-format::after {
            content: "年/月/日";
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            color: #999;
            font-size: 14px;
            pointer-events: none;
            white-space: nowrap;
        }
        
        .date-format.has-value::after {
            display: none;
        }
        
        /* 添加表格中第一行的样式 */
        .report-table tr:first-child {
            height: 60px;
        }
        
        /* 允许项目名称输入 */
        .project-name-cell {
            position: relative;
        }
        
        .project-name-cell input {
            width: 100%;
            height: 100%;
            border: none;
            outline: none;
            background: transparent;
            padding: 8px;
        }
        
        /* 设置验收意见文本区域的样式 */
        .comments textarea {
            padding: 10px;
            font-size: 14px;
            line-height: 1.5;
        }
        
        /* 设置验收结论样式 */
        .conclusion {
            height: 50px;
            text-align: left;
        }
        
        /* 打印样式 */
        @media print {
            body {
                background: white;
                padding: 0;
                margin: 0;
                font-size: 14px;
                color: #000;
            }
            
            .container {
                max-width: 100%;
                margin: 0;
                padding: 10px;
                box-shadow: none;
                border-radius: 0;
            }
            
            .header {
                margin-bottom: 20px;
                padding-bottom: 10px;
                border-bottom: none;
            }
            
            .header h1 {
                font-size: 18px;
                text-align: center;
                margin-bottom: 15px;
                font-weight: bold;
            }
            
            .new-tag, .separator, .search-btn, .clear-btn, .action-btns {
                display: none !important;
            }
            
            .form-group, .conclusion-group, .file-upload {
                display: none !important;
            }
            
            .report-table {
                margin-top: 0;
                width: 100%;
                border: 1px solid #000;
                page-break-inside: avoid;
                border-collapse: collapse;
                table-layout: fixed;
            }
            
            .report-table, .report-table th, .report-table td, 
            .expert-table, .expert-table th, .expert-table td {
                border: 1px solid #000;
                padding: 5px;
            }
            
            .report-table th {
                font-weight: normal;
                background-color: white !important;
                vertical-align: middle;
                text-align: center;
                width: 60px;
            }
            
            .report-table tr:first-child {
                height: 50px;
            }
            
            .report-table .comments {
                height: 250px;
                vertical-align: top;
            }
            
            .project-name-cell input, .date-format input, .comments textarea, 
            .expert-table input {
                border: none;
                background: transparent;
                padding: 0;
                font-family: inherit;
                font-size: inherit;
                width: 100%;
                height: 100%;
                box-sizing: border-box;
            }
            
            .date-format::after {
                content: none;
            }
            
            /* 显示结论文本，不使用单选按钮 */
            .conclusion {
                padding: 8px;
                text-align: left;
                height: auto;
            }
            
            .conclusion-options {
                display: none;
            }
            
            .conclusion-text {
                display: block !important;
            }
            
            /* 优化专家表格 */
            .expert-table {
                width: 100%;
                border-collapse: collapse;
            }
            
            .expert-table th, .expert-table td {
                height: 30px;
                vertical-align: middle;
                text-align: center;
                padding: 2px;
            }
            
            /* 设置页面边距和方向 */
            @page {
                size: A4 portrait;
                margin: 1cm;
            }
        }
        
        /* 确保打印预览也能正确显示 */
        @media screen {
            .print-only {
                display: none;
            }
        }
        
        /* 添加结论文本样式 */
        .conclusion-text {
            display: none;
        }
    </style>
</head>
<body>
    <!-- SVG图标库 -->
    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
        <symbol id="icon-search" viewBox="0 0 24 24">
            <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
        </symbol>
        <symbol id="icon-file" viewBox="0 0 24 24">
            <path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"/>
        </symbol>
        <symbol id="icon-add" viewBox="0 0 24 24">
            <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"/>
        </symbol>
        <symbol id="icon-print" viewBox="0 0 24 24">
            <path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/>
        </symbol>
        <symbol id="icon-upload" viewBox="0 0 24 24">
            <path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"/>
        </symbol>
        <symbol id="icon-close" viewBox="0 0 24 24">
            <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
        </symbol>
    </svg>

    <div class="container">
        <div class="header">
            <span class="new-tag">新增</span>
            <h1>XXXX 项目专家验收报告</h1>
            <div class="separator"></div>
        </div>

        <div class="form-group">
            <label class="form-label required">项目名称</label>
            <input type="text" class="form-control" placeholder="请输入项目名称">
            <button class="clear-btn">×</button>
        </div>

        <div class="form-group">
            <label class="form-label">项目编号</label>
            <input type="text" class="form-control" placeholder="请输入项目编号">
            <button class="clear-btn">×</button>
        </div>

        <div class="form-group">
            <label class="form-label">承建单位</label>
            <input type="text" class="form-control" placeholder="请输入承建单位">
            <button class="clear-btn">×</button>
        </div>

        <div class="form-group">
            <label class="form-label">监理单位</label>
            <input type="text" class="form-control" placeholder="请输入监理单位">
            <button class="clear-btn">×</button>
        </div>

        <div class="conclusion-group">
            <label class="form-label">验收类型</label>
            <div class="checkbox-group">
                <input type="checkbox" id="check-init">
                <label for="check-init">初验</label>
            </div>
            <div class="checkbox-group">
                <input type="checkbox" id="check-final">
                <label for="check-final">终验</label>
            </div>
            
            <label class="conclusion-label">终验结论</label>
            <div class="checkbox-group">
                <input type="checkbox" id="check-pass">
                <label for="check-pass">通过</label>
            </div>
            <div class="checkbox-group">
                <input type="checkbox" id="check-fail">
                <label for="check-fail">未通过</label>
            </div>
            
            <button class="search-btn">
                <svg><use href="#icon-search"></use></svg>
            </button>
        </div>

        <table class="report-table">
            <tr>
                <th style="width: 60px; height: 60px; vertical-align: middle;">项目<br>名称</th>
                <td style="width: auto;" class="project-name-cell">
                    <input type="text" placeholder="">
                </td>
                <th style="width: 80px; vertical-align: middle;">验收<br>日期</th>
                <td style="width: 150px;" class="date-format">
                    <input type="text" placeholder="">
                </td>
            </tr>
            <tr>
                <th rowspan="2" style="width: 60px;">验收<br>意见<br>及<br>评价</th>
                <td colspan="3" class="comments">
                    <textarea placeholder="请输入验收意见及评价..."></textarea>
                </td>
            </tr>
            <tr>
                <td colspan="3" class="comments">
                    <textarea placeholder="继续输入验收意见及评价..."></textarea>
                </td>
            </tr>
            <tr>
                <td colspan="3" class="conclusion">
                    <div class="conclusion-options">
                        <div class="conclusion-option">
                            <input type="radio" id="conclusion-pass" name="conclusion" value="通过验收">
                            <label for="conclusion-pass">通过验收</label>
                        </div>
                        <div class="conclusion-option">
                            <input type="radio" id="conclusion-fail" name="conclusion" value="不通过">
                            <label for="conclusion-fail">不通过</label>
                        </div>
                        <div class="conclusion-option">
                            <input type="radio" id="conclusion-modify" name="conclusion" value="修改后通过">
                            <label for="conclusion-modify">修改后通过</label>
                        </div>
                    </div>
                    <div class="conclusion-text">通过验收/不通过/修改后通过</div>
                </td>
            </tr>
            <tr>
                <th rowspan="5" style="width: 60px;">专 家<br>名 单<br>及<br>签 字</th>
                <td colspan="3">
                    <table class="expert-table">
                        <tr>
                            <th style="width: 80px;">姓名</th>
                            <th style="width: 120px;">职称/职务</th>
                            <th>工作单位</th>
                            <th style="width: 80px;">签字</th>
                        </tr>
                        <tr>
                            <td><input type="text" placeholder="专家姓名"></td>
                            <td><input type="text" placeholder="职称/职务"></td>
                            <td><input type="text" placeholder="工作单位"></td>
                            <td><input type="text" placeholder="签字"></td>
                        </tr>
                        <tr>
                            <td><input type="text" placeholder="专家姓名"></td>
                            <td><input type="text" placeholder="职称/职务"></td>
                            <td><input type="text" placeholder="工作单位"></td>
                            <td><input type="text" placeholder="签字"></td>
                        </tr>
                        <tr>
                            <td><input type="text" placeholder="专家姓名"></td>
                            <td><input type="text" placeholder="职称/职务"></td>
                            <td><input type="text" placeholder="工作单位"></td>
                            <td><input type="text" placeholder="签字"></td>
                        </tr>
                        <tr>
                            <td><input type="text" placeholder="专家姓名"></td>
                            <td><input type="text" placeholder="职称/职务"></td>
                            <td><input type="text" placeholder="工作单位"></td>
                            <td><input type="text" placeholder="签字"></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>

        <div class="file-upload">
            <div class="file-label">
                附件
            </div>
            <div class="file-btn">
                <svg><use href="#icon-add"></use></svg>
            </div>
            <div class="attachment-list" id="attachmentList">
                <!-- 上传的附件将显示在这里 -->
            </div>
        </div>

        <div class="action-btns">
            <button class="btn btn-success">验收通过</button>
            <button class="btn btn-danger">不通过</button>
            <button class="btn btn-default">保存</button>
            <button class="btn btn-print" onclick="preparePrint()">
                <svg style="width: 16px; height: 16px;"><use href="#icon-print"></use></svg>
                打印
            </button>
            <button class="btn btn-upload">
                <svg style="width: 16px; height: 16px;"><use href="#icon-upload"></use></svg>
                上传附件
            </button>
        </div>
    </div>

    <script>
        // 打印预处理函数
        function preparePrint() {
            console.log('准备打印...');
            
            // 准备打印，将表单字段的值应用到表格中
            const projectNameInput = document.querySelector('.form-group:first-child .form-control');
            const projectNameCell = document.querySelector('.project-name-cell input');
            if (projectNameInput && projectNameCell) {
                projectNameCell.value = projectNameInput.value || '';
            }
            
            const dateInput = document.querySelector('.date-format input');
            if (dateInput && !dateInput.value) {
                dateInput.value = new Date().toLocaleDateString('zh-CN');
            }
            
            // 处理验收结论
            const selectedConclusion = document.querySelector('input[name="conclusion"]:checked');
            const conclusionText = document.querySelector('.conclusion-text');
            if (conclusionText) {
                if (selectedConclusion) {
                    conclusionText.textContent = selectedConclusion.value;
                } else {
                    conclusionText.textContent = "通过验收/不通过/修改后通过";
                }
            }
            
            // 直接调用浏览器的打印功能
            window.print();
        }

        document.addEventListener('DOMContentLoaded', function() {
            // 清空按钮点击事件
            const clearBtns = document.querySelectorAll('.clear-btn');
            clearBtns.forEach(function(btn) {
                btn.addEventListener('click', function() {
                    const input = this.previousElementSibling;
                    input.value = '';
                });
            });
            
            // 返回验收报告列表页
            const backBtn = document.querySelector('.btn-default');
            backBtn.addEventListener('click', function() {
                // 检查是否有未保存的内容
                if (confirm('确定要保存当前验收报告吗？')) {
                    alert('保存成功！');
                    // 实际应用中应该有AJAX请求保存数据
                    // window.location.href = '../acceptance-report.html';
                }
            });
            
            // 验收通过按钮
            const passBtn = document.querySelector('.btn-success');
            passBtn.addEventListener('click', function() {
                if (validateForm()) {
                    if (confirm('确定提交验收通过结果吗？')) {
                        alert('验收通过结果已提交！');
                        window.location.href = '../acceptance-report.html';
                    }
                }
            });
            
            // 不通过按钮
            const failBtn = document.querySelector('.btn-danger');
            failBtn.addEventListener('click', function() {
                if (validateForm()) {
                    if (confirm('确定提交验收不通过结果吗？')) {
                        alert('验收不通过结果已提交！');
                        window.location.href = '../acceptance-report.html';
                    }
                }
            });
            
            // 上传附件按钮
            const uploadBtn = document.querySelector('.btn-upload');
            uploadBtn.addEventListener('click', function() {
                const fileInput = document.createElement('input');
                fileInput.type = 'file';
                fileInput.multiple = true;
                fileInput.style.display = 'none';
                document.body.appendChild(fileInput);
                fileInput.click();
                
                fileInput.addEventListener('change', function() {
                    if (this.files && this.files.length > 0) {
                        for (let i = 0; i < this.files.length; i++) {
                            addAttachmentItem(this.files[i].name);
                        }
                    }
                    document.body.removeChild(fileInput);
                });
            });
            
            // 附件上传区域点击事件
            const fileBtn = document.querySelector('.file-btn');
            fileBtn.addEventListener('click', function() {
                const fileInput = document.createElement('input');
                fileInput.type = 'file';
                fileInput.multiple = true;
                fileInput.style.display = 'none';
                document.body.appendChild(fileInput);
                fileInput.click();
                
                fileInput.addEventListener('change', function() {
                    if (this.files && this.files.length > 0) {
                        for (let i = 0; i < this.files.length; i++) {
                            addAttachmentItem(this.files[i].name);
                        }
                    }
                    document.body.removeChild(fileInput);
                });
            });
            
            // 添加附件项
            function addAttachmentItem(fileName) {
                const attachmentList = document.getElementById('attachmentList');
                const attachmentItem = document.createElement('div');
                attachmentItem.className = 'attachment-item';
                
                attachmentItem.innerHTML = `
                    <svg><use href="#icon-file"></use></svg>
                    ${fileName}
                    <span class="delete-btn">×</span>
                `;
                
                const deleteBtn = attachmentItem.querySelector('.delete-btn');
                deleteBtn.addEventListener('click', function() {
                    attachmentList.removeChild(attachmentItem);
                });
                
                attachmentList.appendChild(attachmentItem);
            }
            
            // 表单验证
            function validateForm() {
                const projectName = document.querySelector('.form-group:first-child .form-control').value;
                if (!projectName) {
                    alert('请输入项目名称！');
                    return false;
                }
                
                return true;
            }
            
            // 初始化一些示例附件
            addAttachmentItem('验收申请表.pdf');
            addAttachmentItem('项目技术文档.docx');
            
            // 处理日期输入
            const dateInput = document.querySelector('.date-format input');
            dateInput.addEventListener('input', function() {
                if (this.value) {
                    this.parentElement.classList.add('has-value');
                } else {
                    this.parentElement.classList.remove('has-value');
                }
            });
        });
    </script>
</body>
</html>
